/*
 * @Description:
 * @Author: zheng yiliang
 * @Date: 2021-04-18 12:40:33
 * @LastEditTime: 2021-04-18 13:59:48
 * @LastEditors: zheng yiliang
 */
import request from '@/utils/request'

// 查询菜单列表
export function getAllCategory (query) {
  return request({
    url: '/category/list',
    method: 'get',
    params: query
  })
}

export function addCategory (data) {
  return request({
    url: '/category/add',
    method: 'post',
    data
  })
}

export function detailCategory (id) {
  return request({
    url: '/category/detail',
    method: 'get',
    params: { id }
  })
}
export function editCategory (data) {
  return request({
    url: '/category/edit',
    method: 'put',
    data
  })
}
export function delCategory (data) {
  return request({
    url: '/category/del',
    method: 'delete',
    data
  })
}
